import { defineStore } from "pinia";
export const userSalaryStore = defineStore("userSalaryStoreId",{
  actions: {
    changeUserName(newValue:string) {
      if (newValue && newValue.length < 10) {
        this.userName = newValue
      }
    }
  },
  getters: {
    getUserName(): string{
      return this.userName
    },
    getSalary(): number{
      return this.salary
    }
  },
  state() {
    return {
      userName: '--',
      salary: 1000
    }
  }
})
